package heven.holt.wan.android.di

import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
import dagger.hilt.components.SingletonComponent
import heven.holt.wan.android.api.*
import retrofit2.Retrofit
import javax.inject.Singleton

@Module
@InstallIn(SingletonComponent::class)
object ApiModule {
    @Provides
    @Singleton
    fun provideApiWanHome(retrofit: Retrofit): ApiWanHomeServer {
        return retrofit.create(ApiWanHomeServer::class.java)
    }

    @Provides
    @Singleton
    fun provideApiWanArticle(retrofit: Retrofit): ApiWanArticleServer {
        return retrofit.create(ApiWanArticleServer::class.java)
    }

    @Provides
    @Singleton
    fun provideApiWanUser(retrofit: Retrofit): ApiWanUserServer {
        return retrofit.create(ApiWanUserServer::class.java)
    }

    @Provides
    @Singleton
    fun provideApiWanCoin(retrofit: Retrofit): ApiWanCoinServer {
        return retrofit.create(ApiWanCoinServer::class.java)
    }

    @Provides
    @Singleton
    fun provideApiWanNavigation(retrofit: Retrofit): ApiWanNavigationServer {
        return retrofit.create(ApiWanNavigationServer::class.java)
    }

    @Provides
    @Singleton
    fun provideApiWanProject(retrofit: Retrofit): ApiWanProjectServer {
        return retrofit.create(ApiWanProjectServer::class.java)
    }

    @Provides
    @Singleton
    fun provideApiWanQa(retrofit: Retrofit): ApiWanQaServer {
        return retrofit.create(ApiWanQaServer::class.java)
    }
}